package com.itmate.db;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;




public class DBUtil {
	

	 
	 public static Connection getConnection() {
		 Connection conn = null;
			String url = "jdbc:mysql://127.0.0.1:3306/test?characterEncoding=utf8";
			String user = "root";
			String password = "root";
			try {
				Class.forName("com.mysql.jdbc.Driver");
				conn = DriverManager.getConnection(url, user, password);
			}catch (Exception e) {
				e.printStackTrace();
			}
			return conn;
	 }
	 
	 
}
